package slick.path2glory.tutorial1;

import java.awt.Toolkit;
import java.util.ArrayList;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.geom.*;
import org.newdawn.slick.state.StateBasedGame;

public class SlickBasicGame extends StateBasedGame {

	static int SCREEN_HEIGHT = Toolkit.getDefaultToolkit().getScreenSize().height;
	static int SCREEN_WIDTH = Toolkit.getDefaultToolkit().getScreenSize().width;

	public static final int MAINMENUSTATE = 0;
	public static final int CHARACTERSELECTSTATE = 1;
	public static final int GAMEPLAYSTATE = 2;

	public static int player1character = 1; // 0 is nothing, 1 is AF, 2 is DAF, 3 is nothing yet and so on.									
	public static int player2character = 1; // 0 is nothing, 1 is AF, 2 is DAF, 3 is nothing yet and so on.
											
	public static int players = 2;

	public SlickBasicGame() {
		super("Slick2D Path2Glory - SlickBasicGame");

		this.addState(new MainMenuState(MAINMENUSTATE));
		this.addState(new GameplayState(GAMEPLAYSTATE));
		this.addState(new CharacterSelectState(CHARACTERSELECTSTATE));
		this.enterState(MAINMENUSTATE);
	}

	@Override
	public void initStatesList(GameContainer gc) throws SlickException {

		this.getState(MAINMENUSTATE).init(gc, this);
		this.getState(GAMEPLAYSTATE).init(gc, this);
		this.getState(CHARACTERSELECTSTATE).init(gc, this);

	}

	public static void main(String[] args) throws SlickException {
		AppGameContainer app = new AppGameContainer(new SlickBasicGame());

		app.setDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, true);
		app.start();
	}

}
